package cz.muni.fi.pa165.travelagency.api.services;

import cz.muni.fi.pa165.travelagency.api.entities.IOrder;
import java.util.List;

/**
 * Interface of order service
 *
 * @author Marián Mozola
 */
public interface IOrderService {

    /**
     * Creates an order and save it to database
     *
     * @param order to create
     */
    void createOrder(IOrder order);

    /**
     * Deletes an order from database
     *
     * @param order to delete
     */
    void deleteOrder(IOrder order);

    /**
     * Finds and returns all orders from database
     *
     * @return all orders
     */
    List<IOrder> findAll();
    
    /**		
     * Finds and returns all unpaid orders		
     *		
     * @return all unpaid orders		
     */		
    List<IOrder> findUnpaid();

    /**
     * Returns single order with given id
     *
     * @param id id of desired order
     */
    IOrder getOrder(Long id);

    /**
     * Updates given order in to the memory
     *
     * @param order order to update
     */
    void updateOrder(IOrder order);
    
}
